﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;
using WsValid;
using System.Data.Objects;

namespace WorkTimePrj.Models
{
    [MetadataType(typeof(Vac_OTMetaData))]
    public partial class Vac_OT
    {
        public SelectList accountlist { get; set; }
        public SelectList typelist { get; set; }
        //private DateTime startDate1 = DateTime.Now;
        //public DateTime startDate { get { return startDate1; } set { startDate1 = value; } }
        //private DateTime endDate1 = DateTime.Now;
        //public DateTime endDate { get { return endDate1; } set { endDate1 = value; } }
    }
     public class Vac_OTMetaData
     {
         public int ID { get; set; }

         [Required(ErrorMessage = "*")]
         [Display(Name = "姓名")]
         public string  account { get; set; }

         [Required(ErrorMessage = "*")]
         [Display(Name = "类型")]
         public int type { get; set; }

         [Required(ErrorMessage = "*")]
         [RegularExpression("[0-9]{1,4}", ErrorMessage = "*")]
         [Display(Name = "时长")]
         public int hour { get; set; }

         //[Required(ErrorMessage = "*")]
         //[Display(Name = "开始日期")]
         //[DataType(DataType.Time)]
         //[DisplayFormatAttribute(ApplyFormatInEditMode = true, DataFormatString = "{0:d}")] 
         //public DateTime startDate { get; set; }

         //[Required(ErrorMessage = "*")]
         //[Display(Name = "结束日期")]
         //[DataType(DataType.Time)]
         //[DisplayFormatAttribute(ApplyFormatInEditMode = true, DataFormatString = "{0:d}")] 
         //public DateTime endDate { get; set; }
     }
     public partial class vwVOT
     {
         public int Num{ get; set; }   
     }
}